﻿using System;
using System.Collections.Generic;
using System.ComponentModel;
using System.Data;
using System.Drawing;
using System.Text;
using System.Linq;
using System.Threading.Tasks;
using System.Windows.Forms;
using DevExpress.XtraEditors;
using DevExpress.XtraGrid.Views.Grid;
using DevExpress.XtraTreeList;

namespace DevExpressDemos.Controls.GridControl
{
    public partial class 自定义单元格颜色 : Frm_GridControlDemo
    {
        public 自定义单元格颜色()
        {
            InitializeComponent();
        }

        private void gridView1_RowCellStyle(object sender, DevExpress.XtraGrid.Views.Grid.RowCellStyleEventArgs e)
        {
            GridView view = sender as GridView;
            if (e.Column == view.FocusedColumn && e.RowHandle == view.FocusedRowHandle)
            {
                e.Appearance.BackColor = Color.LightBlue;
            }
        }
    }
}